package clone;

public class Test {
    public static void main(String[] args) throws CloneNotSupportedException{
        Teacher teacher1 = new Teacher("jn",44,"01");
        Student stu = new Student("djm",22,"12",teacher1);
        Student stu1 =  stu.clone();

        System.out.println("修改之前：");
        System.out.println(stu);
        System.out.println(stu1);

        System.out.println("修改之后：");
        stu.tutor.name = "lgh";
        System.out.println(stu);
        System.out.println(stu1);
    }
}
